CREATE TABLE [dbo].[TTCANC_ANIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[NU_CANJ] [dbo].[TD_VC_008] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[FE_CANJ] [dbo].[TD_DT_001] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTCANC_AN__NU_PR__2E11BAA1] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTCANC_AN__CO_US__2F05DEDA] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCANC_AN__FE_US__2FFA0313] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTCANC_AN__CO_US__30EE274C] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCANC_AN__FE_US__31E24B85] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTCANC_ANIN] ADD CONSTRAINT [PK__TTCANC_A__3FBAFB896A3191A0] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_CLIE], [NU_CANJ], [CO_UNID_CONC], [FE_CANJ], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTCANC_ANIN] ADD CONSTRAINT [FK__TTCANC_ANIN__414F779E] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [CO_CLIE], [NU_CANJ], [FE_CANJ]) REFERENCES [dbo].[TTCANC_ANUL] ([CO_EMPR], [CO_UNID_CONC], [CO_CLIE], [NU_CANJ], [FE_CANJ])
GO
